package com.neborosoft.lib.collections;

/**
 * Created with IntelliJ IDEA.
 * User: stikhonenko
 * Date: 12/7/12
 * Time: 1:35 PM
 * To change this template use File | Settings | File Templates.
 */
public abstract class Container<T> implements Iterable<T> {
    @Override
    public boolean equals(Object o) {
        if(!(o instanceof Iterable)){
            return false;
        }

        return Containers.containerEquals((Iterable)o, (Iterable)this);
    }

    @Override
    public int hashCode() {
        return Containers.calculateHashCode(this);
    }
}
